#pragma once

#include "templatevector.h"
#include "BaseObject.h"
#include "globals.h"

struct MapTile
{
	TemplateVector<BaseObject*> population;
};

class GameMap : public BaseObject
{
	point m_size, m_tilesize;
	MapTile ** m_map;
	TemplateVector<BaseObject*> m_mobs;
public:
	void init(point a_size, point a_tilesize, char * a_filename);
	void addToDisplayList();
	point getSize(){return m_size;}
	point getTileSize(){return m_tilesize;}
	TemplateVector<BaseObject*> * getMobs(){return &m_mobs;}
	void update(int a_ms);
	~GameMap()
	{
		for(int i = 0; i < m_mobs.size(); ++i)
		{
			delete m_mobs.get(i);
		}
		m_mobs.release();
	}
};